<!DOCTYPE html>
<html>
<head>
    <title>文章 - 我的 beego 博客</title>
    {{template "header" .}}
</head>
<body>
{{template "navbar" .}}
<div class="container">
    <div class="page-header"></div>
    <h1>修改文章</h1>
    <form method="post" action="/topic" enctype="multipart/form-data">
        {{with .Topic}}
        <input type="hidden" name="tid" value="{{.Id}}">
        <div class="form-group">
            <label>文章标题：</label>
            <input type="text" name="title" class="form-control" value="{{.Title}}">
        </div>
        <div class="form-group">
            <label>文章分类：</label>
            <input type="text" name="category" class="form-control" value="{{.Category}}">
        </div>
        <div class="form-group">
            <label>文章标签：</label>
            <input type="text" name="labels" class="form-control" value="{{.Labels}}">
        </div>
        <div class="form-group">
            <label>文章内容：</label>
            <textarea name="content" class="form-control" cols="30" rows="10">{{.Content}}</textarea>
        </div>
        <div class="form-group">
            <label>文章附件(<a href="/attachment/{{.Id}}/{{.Attachment}}">{{.Attachment}}</a>)：</label>
            <input type="file" name="attachment" class="form-control"/>
        </div>
        <button type="submit" class="btn btn-default">修改文章</button>
        {{end}}
    </form>
</div>

<script type="text/javascript" src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
</body>
</html>